package cn.itsource.org.controller;

import cn.itsource.basic.domain.AjaxResult;
import cn.itsource.org.domain.User;
import cn.itsource.org.service.LoginService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
/**
 * @Api 作用在类上 value 里面填写的是当前类的文档描述
 */
@Api(value = "店铺管理的接口文档",description = "店铺管理的接口文档")
public class LoginController {

    @Autowired
    LoginService loginService;
    @PostMapping("user")
    public AjaxResult binder(@RequestBody User user){
        return loginService.LoginByUser(user);
    }
}
